-
Notifications
You must be signed in to change notification settings - Fork 1
/
[page].astro
26 lines (22 loc) · 1.19 KB
/
[page].astro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
import { get } from '/content';
/* ·········································································· */
import Layout from '../../layouts/Default.astro';
import DocPage from '../../modules/DocPage.astro';
/* —————————————————————————————————————————————————————————————————————————— */
export async function getStaticPaths() {
const files = await get(Astro.glob('/content/docs/**/*.{md,mdx,yaml}'));
return (
files.docs &&
Object.entries(files.docs).map(([key]) => ({ params: { page: key } }))
);
}
/* —————————————————————————————————————————————————————————————————————————— */
const content = await get(Astro.glob('/content/**/*.{md,mdx,yaml}'), {
// NOTE: Ignore this. Used for collecting + building Web GUI static data.
editMode: import.meta.env.PROD,
});
---
<Layout>
<DocPage docs={content.docs} />
</Layout>